import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // }
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',    /*登录 */
      name: 'login',
      component: resolve => require(['../views/account/login'], resolve).default,
    },
    {
      path: '/register',    /*注册 */
      name: 'register',
      component: resolve => require(['../views/account/register'], resolve).default,
    },
    {
      path: '/wrapper',
      name: 'wrapper',
      component: resolve => require(['../views/wrapper'], resolve),
      children:[
        {
          path: '/index',    /* 首页 */
          name: 'index',
          component: resolve => require(['../views/index'], resolve).default,
        },
        {
          path: '/dukascopy',    /* */
          name: 'dukascopy',
          component: resolve => require(['../views/dukascopy'], resolve).default,
        },
        {
          path: '/capital',    /*资金盘 */
          name: 'capital',
          component: resolve => require(['../views/capital/capital'], resolve).default,
        },
        {
          path: '/notice/list',    /*公告  =>  列表 */
          name: 'noticelist',
          component: resolve => require(['../views/notice/list'], resolve).default,
        },
        {
          path: '/home',    /*个人中心 */
          name: 'home',
          component: resolve => require(['../views/home/home'], resolve).default,
        },
        
      ]
    },
    {
      path: '/notice/details/:id',    /*公告  =>  详情 */
      name: 'noticedetails',
      component: resolve => require(['../views/notice/details'], resolve).default,
    },
    {
      path: '/transfer',    /*个人中心  =>  转账 */
      name: 'transfer',
      component: resolve => require(['../views/home/transfer'], resolve).default,
    },
    {
      path: '/transferrecord',    /*个人中心  =>  转账记录 */
      name: 'transferrecord',
      component: resolve => require(['../views/home/transferrecord'], resolve).default,
    },
    {
      path: '/recharge',    /*个人中心  =>  充值 */
      name: 'recharge',
      component: resolve => require(['../views/home/recharge'], resolve).default,
    },
    {
      path: '/rechargerecord',    /*个人中心  =>  充值记录 */
      name: 'rechargerecord',
      component: resolve => require(['../views/home/rechargerecord'], resolve).default,
    },
    {
      path: '/cash',    /*个人中心  =>  提现 */
      name: 'cash',
      component: resolve => require(['../views/home/cash'], resolve).default,
    },
    {
      path: '/cashrecord',    /*个人中心  =>  提现记录 */
      name: 'cashrecord',
      component: resolve => require(['../views/home/cashrecord'], resolve).default,
    },
    {
      path: '/accountinfo',    /*个人中心  =>  绑定账户信息 */
      name: 'accountinfo',
      component: resolve => require(['../views/home/accountinfo'], resolve).default,
    },
    {
      path: '/passwordmanage',    /*个人中心  =>  设置密码 */
      name: 'passwordmanage',
      component: resolve => require(['../views/home/passwordmanage'], resolve).default,
    },
    {
      path: '/transformation',    /*个人中心  =>  证券转换美金 */
      name: 'transformation',
      component: resolve => require(['../views/home/transformation'], resolve).default,
    },
    {
      path: '/extension',    /*个人中心  =>  推广 */
      name: 'extension',
      component: resolve => require(['../views/home/extension'], resolve).default,
    },
    {
      path: '/applypas',    /*个人中心  =>  设置密码  =>  设置支付密码 */
      name: 'applypas',
      component: resolve => require(['../views/home/applypas'], resolve).default,
    },
    {
      path: '/editapplypas',    /*个人中心  =>  设置密码  =>  修改支付密码 */
      name: 'editapplypas',
      component: resolve => require(['../views/home/editapplypas'], resolve).default,
    },
    {
      path: '/editloginpas',    /*个人中心  =>  设置密码  =>  修改登录密码 */
      name: 'editloginpas',
      component: resolve => require(['../views/home/editloginpas'], resolve).default,
    },
    {
      path: '/forgetpassword',    /*个人中心  =>  忘记密码 */
      name: 'forgetpassword',
      component: resolve => require(['../views/home/forgetpassword'], resolve).default,
    },

  ]
})
